#include <stdio.h>
#include <stdlib.h>

static int mem_count =0;

void* s_malloc(size_t size)
{
	mem_count++;
	return (size)?(malloc(size)):(NULL);
}

void s_free(void* p)
{
	if(p!=NULL)
	{
		mem_count--;
		free(p);
	}
}

void mem_print()
{
	printf("mem = %d\n", mem_count);
}

